package Hongbao;

import java.util.ArrayList;

public class Manager extends User {
    public Manager() {
    }

    public Manager(String name, int money) {
        super(name, money);
    }
    public ArrayList<Integer> send(int sendMoney,int count){
        ArrayList<Integer> red=new ArrayList<Integer>();
        if (sendMoney>super.getMoney()){
            System.out.println("余额不足");
        }
        super.setMoney(super.getMoney()-sendMoney);
            int avg=sendMoney/count;
            int num=sendMoney%count;
        for (int i = 0; i <count-1 ; i++) {
            red.add(avg);
        }
        int last=avg+num;
        red.add(last);
        return red;
    }
}
